The present invention relates to a bi-directional serial bus system suitable for constructing an electronic musical instrument.
In conventional electronic musical instruments, one type of electronic musical instrument has only a single CPU (Central Processing Unit). Keyboard switches for detecting operations of each key on a keyboard, and panel operators such as panel switches for making various settings such as timbre setting are connected to a parallel I/O (Input-output). The CPU retrieves operation information about the keyboard switches and panel operators through the parallel I/O, generates a sound parameter based on the operation information, and transfers the sound parameter to a tone generator in response to sounding timing so that the tone generator will generate a sound.
There is also known another type of conventional electronic musical instrument provided with two or more CPUs. In such a type of electronic musical instrument provided with two or more CPUs, the CPUs share the operations and functions. For example, a keyboard CPU scans keyboard switches to detect and output operation information about each key. A panel CPU scans panel operators to detect and output operation information about each panel operator while controlling a display on a panel display device. A main CPU receives a keyboard input signal from the keyboard CPU and operation information about the panel operators from the panel CPU, generates a sound parameter based on the operation information, and transfers the sound parameter to a tone generator in response to sounding timing so that the tone generator will generate a sound. In this case, the main CPU is connected to the keyboard CPU and the panel CPU through independent serial communication paths, respectively, for communicating with each other through the communication paths.
The conventional electronic musical instruments provided with only one CPU vary in functions and shape from a product to product. Therefore, a circuit board incorporated in each electronic musical instrument needs to be individually designed for and mounted in the electronic musical instrument, which makes it impossible to use a circuit board mounted in an existing product to another new product because of lack of compatibility and universality.
Further, in the conventional electronic musical instruments provided with two or more CPUS, communication specifications between the main CPU and the keyboard CPU, and communication specifications between the main CPU and the panel CPU are determined separately for each product. Therefore, various circuit boards mounted in existing different products may not be connected to each other, which makes it impossible to re-use those circuit boards because of lack of compatibility and universality. Further, if a plurality of keyboards are required, an additional keyboard circuit board with a keyboard CPU mounted thereon must be connected to a main circuit board on which the main CPU is mounted. Then new connection hardware must be added to the main circuit board, resulting in a redesign of the main circuit board.
It is therefore an object of the present invention to provide an electronic musical instrument bus system capable of conducting communication among a plurality of devices constituting the electronic musical instrument through a bus by simply connecting the devices to the bus.
In attaining the above-mentioned object and according to one aspect of the present invention, there is provided a bus system interconnecting a plurality of devices of various categories constituting an electronic music instrument apparatus for exchanging signals among the devices having unique addresses. The bus system comprises a serial clock line connecting to the devices for transmission of a clock signal, and a serial data line connecting to the devices for transfer of a data signal from a source device to a destination device in synchronization with the clock signal. The source device operates as a master to commence a communicating session such as to send the clock signal to the serial clock line and to send the data signal to the serial data line in synchronization with the clock signal. The destination device operates as a slave during the communicating session such as to receive the data signal through the serial data line based on the clock signal fed from the serial clock line. The source device formulates the data signal containing a unique address specifying the destination device such that the destination device can receive the data signal exclusively from the source device. The unique address comprises category information designating a category to which the destination device belongs and a sub-address specifying the destination device in the designated category.
In the above-mentioned electronic musical instrument bus system according to the present invention, the devices are classified into four categories of a host type having a first priority, a keyboard type having s second priority, a panel type having a third priority and a MIDI type having a fourth priority. In case that two or more of source devices try to commence respective communicating sessions to respective destination devices of different categories, the source device having the communicating session to the destination device of the category having the highest priority precedes as the master of the communicating session.
Further, in the above-mentioned electronic musical instrument bus system according to the present invention, the source device produces the data signal composed of data and index information which precedes the data and indicates a kind of the data.
Furthermore, the above-mentioned electronic musical instrument bus system, according to the present invention, adapts to a plurality of specific protocols dedicated to a plurality of categories of the devices and a general protocol common to all of the categories. The source device can selectively use either of the specific protocol dedicated to the destination device or the general protocol for handling the communicating session between the source device and the destination device.
Furthermore, in the above-mentioned electronic musical instrument bus system according to the present invention, a source device belonging to a category of a host type can use a plurality of protocols dedicated to respective categories of the devices. The source device belonging to the category of the host type selects the protocol dedicated to the category of the destination device for handling the communicating session between the source device and the destination device.
Furthermore, in the above-mentioned electronic musical instrument bus system according to the present invention, the source device belonging to the category of the host type formulates the data signal containing an address which corresponds to the selected protocol and which specifies the destination device such that the source device can handle the communicating session with the destination device by the selected protocol.
According to the above-mentioned aspect of the present invention, communication among devices constituting an electronic musical instrument can be carried out through the bus system. In this case, the data signal sent from the master is given an address unique to the device of the data transmission destination, and the address consists of category information indicative of the category of the device and the sub-address specifying one of devices in the same category. Thus the communication among various category devices can be carried out through the bus system. In such an electronic musical instrument, for example, when a keyboard is newly developed as a device, the keyboard has only to be connected to the electronic musical instrument bus system to construct the electronic musical instrument. In this case, the other devices such as the panel and host devices can be used as they are.
Further, when a device is added for grade-up of a function, the device to be added has only to be connected to the electronic musical instrument to construct an electronic musical instrument with a new device added thereto. Therefore, product development costs can be remarkably reduced, and any function can be added in a short time.
Thus the present invention allows each device to be used in different products, which in turn makes it possible to develop the products on a device basis while maintaining the compatibility and universality.
In another aspect of the present invention, there is provided a bus system comprising a bus supporting a session of transfer of music data by a bi-directional serial communication, and a plurality of devices interconnected to each other through the bus to constitute an electronic musical instrument apparatus such that one of the devices may become a master by its own initiative to conduct a session, and another of the devices may become a slave when addressed by the master during the session. The devices include a manual input device being composed of either a keyboard or an operating panel for inputting the music data and being adaptable to the bus for conducting a session of transfer of the music data, a MIDI device being designed for treating the music data in MIDI format and being adaptable to the bus for conducting a session of transfer of the music data, and a host device being capable of controlling the manual input device and the MIDI device and being adaptable to the bus for conducting a session of transfer of the music data.
Further, in the above-mentioned electronic musical instrument bus system according to the present invention, the session held between the host device and the manual input device is designed to transfer the music data in a packet form having a first data length, and the session held between the host device and the MIDI device treats the music data including a MIDI message and a system exclusive message such that the session transfers the MIDI message in a packet form having the first data length and transfers the system exclusive message in another packet form having a second data length longer than the first data length.
According to the above-mentioned aspect of the present invention, major packet lengths of MIDI messages exchanged between the operation/input devices such as the keyboards or panels and the MIDI devices are integrated into the fist predetermined length, which makes it possible to simplify reception processing by each device. Further, since only the system exclusive message that tends to be longer in byte length is transmitted as the second predetermined-length packet longer in packet length than the first predetermined-length packet, communication efficiency of the system exclusive cannot decrease.
Furthermore, in the above-mentioned electronic musical instrument of the present invention, the manual input device includes a plurality of visual elements for visually indicating music information. The host device can initiate a session to transfer music data including a group message and a mode message to the manual input device. The group message is effective to divide the plurality of the visual elements into groups, and the mode message is effective to totally control a mode of indicating the music information by the visual elements in the same group.
Furthermore, the groups may include a group containing visual elements having a fixed mode of indicating the music information.
According to the above-mentioned aspect of the present invention, the plural visual elements can be controlled at the same time. Further, if few changes in combination of visual elements to be controlled occur, the number of command issued for controlling the displays can be reduced.
Furthermore, in the above-mentioned electronic musical instrument according to the present invention, a session held between the host device and the MIDI device is designed to transfer the music data representing a MIDI message composed of a status byte and data bytes subsequent to the status byte. The MIDI message is transmitted in the form of a packet containing index information and a header. The index information indicates a type of the MIDI message and substitutes the status byte. The header contains an address specifying a destination device of the MIDI message.
Furthermore, in the above-mentioned electronic musical instrument bus system according to the present invention, the destination device reconstructs the received packet into the MIDI message by changing the index information contained in the package into the corresponding status byte.
According to the above-mentioned aspect of the present invention, any MIDI message can be transmitted and received in the electronic musical instrument bus system without affecting the universality of the MIDI message.